'\" te
.\"  Copyright 2006 Sun Microsystems.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH QUNTIMEOUT 9F "Jan 16, 2006"
.SH NAME
quntimeout \- cancel previous qtimeout function call
.SH SYNOPSIS
.nf
#include <sys/stream.h>
#include <sys/ddi.h>



\fBclock_t\fR \fBquntimeout\fR(\fBqueue_t\fR \fI*q\fR, \fBtimeout_id_t\fR \fIid\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI).
.SH PARAMETERS
.ne 2
.na
\fB\fIq\fR\fR
.ad
.RS 6n
Pointer to a \fBSTREAMS \fRqueue structure.
.RE

.sp
.ne 2
.na
\fB\fIid\fR\fR
.ad
.RS 6n
Opaque timeout \fBID\fR a previous \fBqtimeout\fR(9F) call.
.RE

.SH DESCRIPTION
The \fBquntimeout()\fR function cancels a pending \fBqtimeout\fR(9F) request.
The \fBquntimeout()\fR function is tailored to be used with the enhanced
\fBSTREAMS\fR framework interface, which is based on the concept of perimeters.
(See \fBmt-streams\fR(9F).) \fBquntimeout()\fR returns when the timeout has
been cancelled or finished executing. The timeout will be cancelled even if it
is blocked at the perimeters associated with the queue. \fBquntimeout()\fR
should be executed for all outstanding timeouts before a driver or module close
returns. All outstanding timeouts and bufcalls must be cancelled before a
driver close routine can block and before the close  routine calls
\fBqprocsoff\fR(9F).
.SH RETURN VALUES
The \fBquntimeout()\fR function returns \fB-1\fR if the \fBid\fR is not found.
Otherwise, \fBquntimeout()\fR returns a \fB0\fR or positive value.
.SH CONTEXT
The \fBquntimeout()\fR function can be called from user, interrupt, or kernel
context.
.SH SEE ALSO
.BR mt-streams (9F),
.BR qbufcall (9F),
.BR qtimeout (9F),
.BR qunbufcall (9F)
.sp
.LP
\fIWriting Device Drivers\fR
.sp
.LP
\fISTREAMS Programming Guide\fR
